﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System;
using System.Windows.Forms;

namespace sy4_8
{
    public partial class Form1 : Form
    {
        // 声明子窗体对象（避免重复实例化）
        Form2 frm2 = new Form2();
        Form3 frm3 = new Form3();
        Form4 frm4 = new Form4();
        Form5 frm5 = new Form5();
        Form6 frm6 = new Form6();

        public Form1()
        {
            InitializeComponent();
        }

        // “计算机配置”菜单/工具栏按钮点击事件
        private void 计算机配置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm2
.Show();
        }

        // “选课程序”菜单/工具栏按钮点击事件
        private void 选课程序ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm3
.Show();
        }

        // “三角函数运算”菜单/工具栏按钮点击事件
        private void 三角函数运算ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm4
.Show();
        }

        // “蝴蝶飞”菜单/工具栏按钮点击事件
        private void 蝴蝶飞ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm5
.Show();
        }

        // “退出”菜单点击事件
        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application
.Exit();
        }

        // “关于”菜单/快捷菜单点击事件
        private void 关于AToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm6
.ShowDialog(); // 以对话框形式显示
        }
    }
}
